#question 1
def ways_2_walk(max_steps, height):
    if height == 0 or height == 1:
        return 1
        #递归前提
    
    ways = 0
    for i in range(1, min(height, max_steps) + 1):
        ways += ways(height - i, max_steps)
        #递归过程
        
    return ways

print(ways_2_walk(3, 3))
#question 2
def fibonnacci_num_line(n):
    if n == 0 or n == 1:
        return 1
    return fibonnacci_num_line(n - 1) + fibonnacci_num_line(n - 2)